home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1996 May / cd joy 71No13.iso / pc / demos / eurosoc / source / quick < prev    next >
Text File  |  1996-03-11  |  2KB  |  63 lines

  1.  
  2. //********************************************************************************************************************************
  3.  
  4. void    DoInjuriesAndMatchBans( char GAMEtype, char Team )
  5.     {
  6.         char    LastPlyr, Swapped;
  7.         short    PlyrIndex, Plyr;
  8.  
  9.         if ( GAMEtype == EURO_championship )
  10.         {
  11.             LastPlyr = 19;
  12.             Swapped     = 1;
  13.             
  14.             while    ( Swapped !=0 )
  15.             {        
  16.  
  17.                 // **** Find A Spot At The End Of The Squad List For Player To Be Swapped Into ****
  18.  
  19.                 PlyrIndex =    NormalisePlayer( LastPlyr, Team );
  20.  
  21.                 if ( DiscPts[PlyrIndex] > 1 || Fitness[PlyrIndex] < Injured )
  22.                 {
  23.                   LastPlyr--;
  24.                   if ( LastPlyr < 1 )    // **** checked all available players so bomb out and leave player 
  25.                     Swapped = 0;    //      were he is ****
  26.                 }
  27.             
  28.                 else
  29.  
  30.  
  31.                 {            
  32.                   for ( char s=0; s < 11; s ++ )
  33.                   {
  34.                     Swapped = 0;
  35.                     PlyrIndex =    NormalisePlayer( s, Team );
  36.  
  37.                     if ( DiscPts[PlyrIndex] > 1 || Fitness[PlyrIndex] < Injured )
  38.                     {
  39.                       char p = SquadInfo[ (Team*20)+s ];
  40.                       SquadInfo[ (Team*20)+s ] = SquadInfo[ (Team*20)+LastPlyr ];
  41.                       SquadInfo[ (Team*20)+LastPlyr ] =    p;
  42.                       Swapped = 1;
  43.                                         
  44.                 // **** Was This An Ideal Swap ****                    
  45.  
  46. //                      if ( PlayerPosns[ (Team*20)+s ] != PlayerPosns[ (Team*20)+LastPlyr ] )
  47. //                      {
  48. //                      }
  49.  
  50.  
  51.  
  52.  
  53.                     }                        
  54.                   }
  55.                 }
  56.             }
  57.         }
  58.     }
  59.     
  60. //********************************************************************************************************************************
  61.  
  62.  
  63.